<?php

require('/opt/php/xhprof/xhprofStart.php');

define('WEB_SERVER_ROOT_PATH',  '/opt/php/sns/');
require(WEB_SERVER_ROOT_PATH. 'config/config.php');

$do         =   DOP::request('do');
$time       =   DOP::request('time');
$param      =   DOP::request('param');
$hostUid    =   DOP::request('hostUid');
$signature  =   DOP::request('signature');

if (empty($do) || empty($time) || empty($signature))
{
    $result =   'param is B wrong! must need: do, time, signature';
    exit ($result);
}
define('HOST_UID', $hostUid);

$api    =   new SnsApi();
$result =   $api->callApi($do, $param, $time, $signature);

# xhprof monitor list
$xhprof =   array(
                2526793 =>  'kisskillkiss',
                2668814 =>  'server',
            );
if (isset($xhprof[HOST_UID]))
{
    require('/opt/php/xhprof/xhprofEnd.php');
}
exit ($result);

